package com.project.bean;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.List;


/**
 * (Detail实体类)
 */
@TableName("t_orderInfo")
public class OrderInfoBean implements Serializable {
    /**明细编号*/
    @TableId(value = "pk_orderInfoId",type = IdType.AUTO)
    private Integer id;
    /**所属订单编号*/
    @TableField("fk_orderId")
    private Integer orderId;
    /**商品对象*/
    @TableField(exist = false)
    private ProductBean product;
    /**商品数量*/
    @TableField("i_num")
    private Integer num;
   

    public OrderInfoBean() {
    }

    public OrderInfoBean(Integer orderId, Integer productId, Integer num) {
        this.orderId = orderId;
        this.product = new ProductBean();
        this.product.setId(productId);
        this.num = num;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    @Override
    public String toString() {
        return "OrderInfoBean{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", product=" + product +
                ", num=" + num +
                "}\n";
    }
}

